home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / makemdbm.z / makemdbm
Encoding:
Text File  |  1998-10-20  |  4.0 KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmaaaakkkkeeeemmmmddddbbbbmmmm((((1111MMMM))))                                                      mmmmaaaakkkkeeeemmmmddddbbbbmmmm((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      makemdbm, makedbm - make an NIS mdbm file
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmaaaakkkkeeeemmmmddddbbbbmmmm [ ----bbbb ] [ ----llll ] [ ----iiii _y_p__i_n_p_u_t__f_i_l_e ] [ ----oooo _y_p__o_u_t_p_u_t__n_a_m_e ]
  13.           [ ----dddd _y_p__d_o_m_a_i_n__n_a_m_e ] [ ----mmmm _y_p__m_a_s_t_e_r__n_a_m_e ] _i_n_f_i_l_e _o_u_t_f_i_l_e
  14.      mmmmaaaakkkkeeeemmmmddddbbbbmmmm [ ----uuuu _m_d_b_m_f_i_l_e_n_a_m_e ]
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _m_a_k_e_m_d_b_m takes _i_n_f_i_l_e and converts it to a file in _m_d_b_m(3B) format.  Each
  18.      line of the input file is converted to a single _m_d_b_m record.  All
  19.      characters up to the first tab or space form the key, and the rest of the
  20.      line is the data.  If a line ends with \, then the data for that record
  21.      is continued on to the next line.  It is left for the clients of the
  22.      network information service (NIS) to interpret #; _m_a_k_e_d_b_m does not itself
  23.      treat it as a comment character.  _i_n_f_i_l_e can be ----, in which case standard
  24.      input is read.
  25.  
  26.      _m_a_k_e_m_d_b_m is meant to be used in generating _m_d_b_m files for NIS.  It
  27.      generates a special entry with the key _y_p__l_a_s_t__m_o_d_i_f_i_e_d, which is the
  28.      date of _i_n_f_i_l_e (or the current time, if _i_n_f_i_l_e is ----).
  29.  
  30. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  31.      ----llll   Convert all uppercase characters in the keys to lowercase.
  32.  
  33.      ----iiii _y_p__i_n_p_u_t__f_i_l_e
  34.           Create a special entry with the key _Y_P__I_N_P_U_T__F_I_L_E.
  35.  
  36.      ----oooo _y_p__o_u_t_p_u_t__n_a_m_e
  37.           Create a special entry with the key _Y_P__O_U_T_P_U_T__N_A_M_E.
  38.  
  39.      ----dddd _y_p__d_o_m_a_i_n__n_a_m_e
  40.           Create a special entry with the key _Y_P__D_O_M_A_I_N__N_A_M_E.
  41.  
  42.      ----mmmm _y_p__m_a_s_t_e_r__n_a_m_e
  43.           Create a special entry with the key _Y_P__M_A_S_T_E_R__N_A_M_E.  If no master
  44.           hostname is specified, _y_p__m_a_s_t_e_r__n_a_m_e is set to the local hostname.
  45.  
  46.      ----uuuu _m_d_b_m_f_i_l_e_n_a_m_e
  47.           Undo a _m_d_b_m file.  That is, print out a _m_d_b_m file one entry per
  48.           line, with a single space separating keys from values.
  49.  
  50. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  51.      It is easy to write shell scripts to convert standard files such as
  52.      /_e_t_c/_p_a_s_s_w_d to the key value form used by _m_a_k_e_m_d_b_m.  For example,
  53.  
  54.           #!/usr/bin/awk -f
  55.           BEGIN { FS = ":"; OFS = "\t"; }
  56.                 { print $1, $0 }
  57.  
  58.      takes the /_e_t_c/_p_a_s_s_w_d file and converts it to a form that can be read by
  59.      _m_a_k_e_m_d_b_m to make the NIS file _p_a_s_s_w_d._b_y_n_a_m_e.  That is, the key is a
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmaaaakkkkeeeemmmmddddbbbbmmmm((((1111MMMM))))                                                      mmmmaaaakkkkeeeemmmmddddbbbbmmmm((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      username, and the value is the remaining line in the /_e_t_c/_p_a_s_s_w_d file.
  75.  
  76. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  77.      yppasswd(1), nis(1M), mdbm(3B).
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.